<?php

declare(strict_types=1);

namespace App\Model\Orders;

use App\Model\Model;
use App\Traits\Model\Orders\Invoice as InvoiceTraits;

/**
 * @property int $id 
 * @property int $order_id 订单号
 * @property int $shop_id 店铺ID
 * @property string $consignee 收货人
 * @property string $zipcode 邮箱
 * @property string $mobile 手机号码
 * @property string $prov 省
 * @property string $city 市
 * @property string $area 区
 * @property string $address 详细地址
 * @property string $logistics_code 物流编码
 * @property string $logistics_name 物流公司
 * @property string $postage_amount 邮费
 * @property string $logistics_no 物流单号
 * @property string $note 备注
 * @property string $best_at 友好收货时间
 * @property int $type 发货方式|{"1":"自填快递","2":"在线预约","3":"电子面单","4":"无需物流"}
 * @property \Carbon\Carbon $created_at 
 * @property \Carbon\Carbon $updated_at 
 */
class Invoice extends Model
{
    use InvoiceTraits;

    /**
     * The table associated with the model.
     */
    protected ?string $table = 'invoice';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['id', 'order_id', 'shop_id', 'consignee', 'zipcode', 'mobile', 'prov', 'city', 'area', 'address', 'logistics_code', 'logistics_name', 'postage_amount', 'logistics_no', 'note', 'best_at', 'type', 'created_at', 'updated_at'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'order_id' => 'integer', 'shop_id' => 'integer', 'type' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime'];
}
